package com.auto.code.dao.impl;

import com.auto.code.dao.TemplateDAO;
import com.auto.code.domain.TemplateDO;
import com.auto.code.mapper.TemplateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class TemplateDAOImpl implements TemplateDAO {
    @Autowired
    private TemplateMapper templateMapper;

    @Override
    public int deleteById(Long id) {
        return templateMapper.deleteById(id);
    }

    @Override
    public int insert(TemplateDO record) {
        return templateMapper.insert(record);
    }

    @Override
    public TemplateDO getById(Long id) {
        return templateMapper.getById(id);
    }

    @Override
    public int update(TemplateDO record) {
        return templateMapper.update(record);
    }

    @Override
    public List<TemplateDO> queryList(Map<String, Object> params) {
        return templateMapper.queryList(params);
    }
}